#define _CRT;_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main() {
	int count = 0;
	scanf("%d", &count);
	printf ("%d",factorial(count));

	return 0;
}

int factorial() {
	if (count >= 1) {
		return(count * factorial(count--));
	}
}